-- dbo.CfgCtrl
DELETE FROM dbo.CfgCtrl WHERE CfgCtrlKey = 'MaxEventLogDaysToKeep'
GO
DELETE FROM dbo.CfgCtrl WHERE CfgCtrlKey = 'MaxEventLogIdCollectedByRepos'
GO
DELETE FROM dbo.CfgCtrl WHERE CfgCtrlKey = 'RepositoryInUseFlag'
GO

INSERT dbo.CfgCtrl
     ( CfgCtrlKey, CfgCtrlValue, CfgCtrlDescription )
SELECT 'MaxEventLogDaysToKeep', '30', 'Maximum number of days to keep EventLog entries.'
UNION ALL
SELECT 'MaxEventLogIdCollectedByRepos', '0', 'Maximum EventLogId Collected By Repository.'
UNION ALL
SELECT 'RepositoryInUseFlag', '0', 'Flag indicating whether the Repository collection Process is in use.'
GO

-- Populate dbo.EventLogType
TRUNCATE TABLE dbo.EventLog
GO
DELETE FROM dbo.EventLogType 
GO

INSERT dbo.EventLogType 
     ( EventLogTypeId, EventLogTypeCd, EventLogTypeDesc ) 
SELECT 0, 'UNK', 'Unknown'
UNION ALL
SELECT 1, 'INFO', 'Informational'
UNION ALL
SELECT 2, 'WARN', 'Warning'
UNION ALL
SELECT 3, 'FAIL', 'Failure'
GO

-- dbo.Seq
TRUNCATE TABLE dbo.Seq
GO

INSERT dbo.Seq ( SeqName, SeqNumber ) VALUES ( 'PackageExecutionId', 0 )
GO
